From c78de404e75efc82298ff07372f6f0439ed19b4a Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 28 Jun 2007 16:21:27 +0000 Subject: [PATCH] * Delay AJAX watch initialization until click so IE 6 with ugly security settings doesn't prompt you until you use the link. --- RELEASE-NOTES | 2 ++ includes/DefaultSettings.php | 2 +- skins/common/ajaxwatch.js | 13 ++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61bc085af6..fb6b2257c0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -229,6 +229,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Use native XMLHttpRequest class in preference to ActiveX on IE 7; this avoids the "ActiveX "Do you want to allow ActiveX?" prompt when something security settings are cranked this way and AJAX-y gets used. +* Delay AJAX watch initialization until click so IE 6 with ugly security + settings doesn't prompt you until you use the link. == API changes since 1.10 == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d05cb5a634..5bd8538a87 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1198,7 +1198,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches don't keep obsolete copies of global * styles. */ -$wgStyleVersion = '79'; +$wgStyleVersion = '80'; # Server-side caching: diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js index 08b947a5ea..b30e4ffd49 100644 --- a/skins/common/ajaxwatch.js +++ b/skins/common/ajaxwatch.js @@ -52,6 +52,14 @@ wgAjaxWatch.ajaxCall = function() { } else if (wgAjaxWatch.inprogress) { return false; } + if(!wfSupportsAjax()) { + // Lazy initialization so we don't toss up + // ActiveX warnings on initial page load + // for IE 6 users with security settings. + wgAjaxWatch.supported = false; + return true; + } + wgAjaxWatch.inprogress = true; wgAjaxWatch.setLinkText( wgAjaxWatch.watching ? wgAjaxWatch.unwatchingMsg : wgAjaxWatch.watchingMsg); @@ -120,11 +128,6 @@ wgAjaxWatch.onLoad = function() { } } - if(!wfSupportsAjax()) { - wgAjaxWatch.supported = false; - return; - } - // The id can be either for the parent (Monobook-based) or the element // itself (non-Monobook) wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" -- 2.20.1